/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.asseco.mio.codex;

import java.util.Date;
import javax.persistence.*;
import org.appfuse.model.BaseObject;
import org.hibernate.annotations.GenericGenerator;

/**
 *
 * @author filip.apostolski
 */
@Entity @Table(name="POS_TYPE")
public class PosType  extends BaseObject  {
  
    private String id;
    private String posTypeName;
    private String posTypeCode;
    private String posTypeDescr;
    private Boolean status = true;
    private Date activeDate;
    private Date passiveDate;

    @Column(name = "ACTIVE_DATE")
    @Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
    public Date getActiveDate() {
        return activeDate;
    }

    public void setActiveDate(Date activeDate) {
        this.activeDate = activeDate;
    }
  @Id
    @GeneratedValue(generator = "system-uuid")
    @Column(name = "ID", length = 255)
    @GenericGenerator(name="system-uuid", strategy = "uuid")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column(name = "PASSIVE_DATE")
    @Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
    public Date getPassiveDate() {
        return passiveDate;
    }

    public void setPassiveDate(Date passiveDate) {
        this.passiveDate = passiveDate;
    }

    @Column(name = "POS_TYPE_CODE", length = 255)
    public String getPosTypeCode() {
        return posTypeCode;
    }

    public void setPosTypeCode(String posTypeCode) {
        this.posTypeCode = posTypeCode;
    }

    @Column(name = "POS_TYPE_DESCR", length = 4096)
    public String getPosTypeDescr() {
        return posTypeDescr;
    }

    public void setPosTypeDescr(String posTypeDescr) {
        this.posTypeDescr = posTypeDescr;
    }

    @Column(name = "POS_TYPE_NAME", length = 1000)
    public String getPosTypeName() {
        return posTypeName;
    }

    public void setPosTypeName(String posTypeName) {
        this.posTypeName = posTypeName;
    }

    @Column(name = "STATUS")
    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "PosType{" + "id=" + id + "posTypeName=" + posTypeName + "posTypeCode=" + posTypeCode + "posTypeDescr=" + posTypeDescr + "status=" + status + "activeDate=" + activeDate + "passiveDate=" + passiveDate + '}';
    }

    

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final PosType other = (PosType) obj;
        if ((this.id == null) ? (other.id != null) : !this.id.equals(other.id)) {
            return false;
        }
        if ((this.posTypeName == null) ? (other.posTypeName != null) : !this.posTypeName.equals(other.posTypeName)) {
            return false;
        }
        if ((this.posTypeCode == null) ? (other.posTypeCode != null) : !this.posTypeCode.equals(other.posTypeCode)) {
            return false;
        }
        if ((this.posTypeDescr == null) ? (other.posTypeDescr != null) : !this.posTypeDescr.equals(other.posTypeDescr)) {
            return false;
        }
        if (this.status != other.status) {
            return false;
        }
        if (this.activeDate != other.activeDate && (this.activeDate == null || !this.activeDate.equals(other.activeDate))) {
            return false;
        }
        if (this.passiveDate != other.passiveDate && (this.passiveDate == null || !this.passiveDate.equals(other.passiveDate))) {
            return false;
        }
        return true;
    }

    

    @Override
    public int hashCode() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
